<%
String userid=(String)session.getAttribute("userid");
System.out.print(userid);
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <title></title>
</head>
<body    >


<style>

html { overflow: scroll; }
</style>
<script src="https://g.alicdn.com/aliww/ww/json/json.js" charset="utf-8"></script>

<!-- 强制使用移动端版本的kit -->
<script src="https://g.alicdn.com/aliww/??h5.openim.sdk/1.0.6/scripts/wsdk.js,h5.openim.kit/0.3.3/scripts/kit.js?mobile=1" charset="utf-8"></script>

<%--<script src="https://g.alicdn.com/aliww/??h5.openim.sdk/1.0.6/scripts/wsdk.js,h5.openim.kit/0.3.3/scripts/kit.js" charset="utf-8"></script>
--%>
<script src="js/jquery-1.4.2.min.js" language="JavaScript"></script>
<script>
    var uid='<%=userid%>';
    var doctor_id='<%=request.getParameter("doctor_id")%>';
      doctor_id=doctor_id.substr(2, doctor_id.length-2);
   $.ajax( {    
               url:'/QueyServlet',
               type:'get',    
               cache:false,  
	           data:{op:'sqdoctor',doctor_id: doctor_id},  
		       dataType:'json',   
               success:function(data) { 
		        if(data.result="ok"){
				   if(data.data.length==1){
				       var date=data.data[0];
		                WKIT.init({			
                        uid: uid,
                        appkey:'24472009',
                        credential: '123456',
						
                        touid:  date.doctor_logname,
			            title:  date.doctor_name,
//						
//                        onMsgReceived: function(data){
//                            console.log(data);
//                          },
                    onMsgSent: function(data){
                       console.log(data);
                  },	
				//   onUploaderSuccess: function(url){
                      //  console.log(url);
                   // },
                  });
			     }
			   }
	        }
	         
       });
	   
    

</script>
</body>
</html>